
package com.jf.cloud.search.constant;

import com.jf.cloud.common.constant.Constant;

/**
 * 配置缓存名字
 *
 * @author zz
 * @date 2020/12/30
 */
public interface EsConstant {
    /** 滚动查询的分片数 */
    public static final Integer MAX_PAGE_SIZE = 100;
    /**
     * 装修商品ids缓存名称和缓存失效时间
     */
    String RENOVATION_PRODUCT_IDS_CACHE = "renovationProductIdsCache";
    Integer RENOVATION_PRODUCT_IDS_CACHE_TIME = 300;
    Integer RENOVATION_PRODUCT_IDS_LIMIT = 1000;

    String SCORE = "_score";

    /**
     * 商品
     */
    String SPU_ID = "spuId";
    String SHOP = "shop";
    String SPU_NAME_ZH = "spuNameZh";
    String SPU_NAME_EN = "spuNameEn";
    String SELLING_POINT_ZH = "sellingPointZh";
    String SELLING_POINT_EN = "sellingPointEn";
    String SCORE_FEE = "scoreFee";
    String PRICE_FEE = "priceFee";
    String MARKET_PRICE_FEE = "marketPriceFee";
    String MAIN_IMG_URL = "mainImgUrl";
    String SPU_TYPE = "spuType";
    String IS_COMPOSE = "isCompose";
    String SHOP_NAME = "shopName";
    String SHOP_ID = "shopId";
    String SHOP_ADDR ="shopAddress";
    String AREA_CODE ="areaCode";
    String SHOP_IMG = "shopImg";
    String SHOP_TYPE = "shopType";
    String SPU_STATUS = "spuStatus";
    String PARTY_CODE = "partyCodes";
    String MODEL_ID = "modelIds";
    String HAS_STOCK = "hasStock";
    String PRE_SALE_TYPE = "preSaleType";
    String STOCK = "stock";
    String SALE_NUM = "saleNum";
    String ACTUAL_SOLD_NUM = "actualSoldNum";
    String WATER_SOLD_NUM = "waterSoldNum";
    String COMMENT_NUM = "commentNum";
    String GOOD_REVIEW_NUM = "goodReviewNum";
    String CREATE_TIME = "createTime";
    String UPDATE_TIME = "updateTime";
    String ACTIVITY_START_TIME = "activityStartTime";
    String SELECTED_LOT = "selectedLot";
    String SECKILL_CATEGORY_ID = "seckillCategoryId";
    String BRAND = "brand";
    String SEQ = "seq";
    String IS_TOP = "isTop";
    String ACTIVITY_ID = "activityId";
    String ACTIVITY_PRICE = "activityPrice";
    String SHOP_PRIMARY_CATEGORY_ID = "shopPrimaryCategoryId";
    String SHOP_CATEGORY = "shopCategory";
    String PRIMARY_CATEGORY_ID = "primaryCategoryId";
    String SECONDARY_CATEGORY_ID = "secondaryCategoryId";
    String CATEGORY = "category";
    String TAGS = "tags";
    String TAG_IDS = "tagIds";
    String ATTRS = "attrs";
    String SPU_LIST = "spuList";
    String APP_DISPLAY = "appDisplay";
    String DISTRIBUTION_SPU = "distributionSpu";
    String SUPPLIER_SPU_TYPE="supplierSpuType";
    String SKU_CHOICE_STATUS = "skuChoiceStatus";
    String COMMISSION_SPU_STATUS = "commissionSpuStatus";
    String SUPPLIER_SPU_ID = "supplierSpuId";
    String SPU_CODE = "spuCode";
    String SKU_CODE = "partyCode";
    String SUPPLIER_DELIVERY_TYPE = "supplierDeliveryType";
    String SPU_MOLD = "spuMold";

    /**
     * 分销信息
     */
    String DISTRIBUTION_INFO = "distributionInfo";
    String DISTRIBUTION_SPU_ID = "distributionSpuId";
    String STATE = "state";
    String AWARD_MODE = "awardMode";
    String PARENT_AWARD_SET = "parentAwardSet";
    String AWARD_NUMBERS = "awardNumbers";
    String PARENT_AWARD_NUMBERS = "parentAwardNumbers";
    String STATE_UNION_NAME = DISTRIBUTION_INFO + Constant.PERIOD + STATE;
    String AWARD_MODE_UNION_NAME = DISTRIBUTION_INFO + Constant.PERIOD + AWARD_MODE;

    /**
     * 分组
     */
    String TAG_ID = "tagId";
    String TAG_UNION_ID = TAGS + Constant.PERIOD +  TAG_ID;
    String TAG_SEQ = "seq";
    String TAG_UNION_SEQ = TAGS  + Constant.PERIOD +  TAG_SEQ;

    /**
     * 属性
     */
    String ATTR_IDS = "attrIds";
    String ATTR_ID = "attrId";
    String ATTR_VALUE_ID = "attrValueId";
    String ATTR_NAME_ZH = "attrNameZh";
    String ATTR_NAME_EN = "attrNameEn";
    String ATTR_VALUE_NAME_ZH = "attrValueNameZh";
    String ATTR_VALUE_NAME_EN = "attrValueNameEn";
    String ATTR_VALUE_IDS = "attrValueIds";
    String ATTR_UNION_ID = ATTRS + Constant.PERIOD + ATTR_ID;
    String ATTR_ATTR_VALUE_ID = ATTRS + Constant.PERIOD + ATTR_VALUE_ID;
    String ATTR_UNION_NAME_ZH = ATTRS + Constant.PERIOD + ATTR_NAME_ZH;
    String ATTR_UNION_NAME_EN = ATTRS + Constant.PERIOD + ATTR_NAME_EN;
    String ATTR_UNION_VALUE_ZH = ATTRS + Constant.PERIOD + ATTR_VALUE_NAME_ZH;
    String ATTR_UNION_VALUE_EN = ATTRS + Constant.PERIOD + ATTR_VALUE_NAME_EN;

    /**
     * 品牌
     */
    String BRANDS = "brands";
    String BRAND_ID = "brandId";
    String BRAND_IMG = "brandImg";
    String BRAND_NAME = "brandName";
    String BRAND_NAME_ZH = "brandNameZh";
    String BRAND_NAME_EN = "brandNameEn";
    String BRAND_UNION_ID = BRAND + Constant.PERIOD + BRAND_ID;
    String BRAND_UNION_IMG = BRAND + Constant.PERIOD + BRAND_IMG;
    String BRAND_UNION_NAME_ZH = BRAND + Constant.PERIOD + BRAND_NAME_ZH;
    String BRAND_UNION_NAME_EN = BRAND + Constant.PERIOD + BRAND_NAME_EN;

    /**
     * 分类
     */
    String CATEGORIES = "categories";
    String CATEGORY_ID = "categoryId";
    String CATEGORY_NAME = "categoryName";
    String SHOP_CATEGORIES = "shopCategories";
    String CATEGORY_NAME_ZH = "categoryNameZh";
    String CATEGORY_NAME_EN = "categoryNameEn";
    String SHOP_CATEGORY_ID = "shopSecondaryCategoryId";
    String SHOP_SECONDARY_CATEGORY_ID= "secondaryCategoryId";
    String SHOP_CATEGORYID = "shopCategoryId";
    String CATEGORY_UNION_ID = CATEGORY + Constant.PERIOD + CATEGORY_ID;
    String SHOP_CATEGORY_UNION_ID = SHOP_CATEGORY + Constant.PERIOD + CATEGORY_ID;
    String CATEGORY_UNION_NAME_ZH = CATEGORY + Constant.PERIOD + CATEGORY_NAME_ZH;
    String CATEGORY_UNION_NAME_EN = CATEGORY + Constant.PERIOD + CATEGORY_NAME_EN;
    String CATEGORY_NAMES="categoryNames";


    String TOP_HITS_DATA = "top_hits_data";

    /**
     * 供应商
     */
    String SUPPLIER_NAME = "supplierName";
    String SUPPLIER_ID= "supplierId";

    /**
     * 商品指定返回字段
     */
    String[] BRAND_INCLUDE = {BRAND_UNION_ID, BRAND_UNION_IMG, BRAND_UNION_NAME_ZH, BRAND_UNION_NAME_EN};
    String[] CATEGORY_INCLUDE = {CATEGORY_UNION_ID, CATEGORY_UNION_NAME_ZH, CATEGORY_UNION_NAME_EN};
    String[] ATTR_INCLUDE = {ATTR_UNION_NAME_ZH, ATTR_UNION_NAME_EN, ATTR_ATTR_VALUE_ID, ATTR_UNION_VALUE_ZH, ATTR_UNION_VALUE_EN};
    String[] TAG_INCLUDE = {TAG_ID};
    String[] APP_FETCH_SOURCE = {SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,SELLING_POINT_ZH,SELLING_POINT_EN,SHOP_ID,SHOP_NAME,SHOP_ADDR,AREA_CODE,SHOP_TYPE,SPU_TYPE,PRICE_FEE,MARKET_PRICE_FEE,HAS_STOCK,SALE_NUM,COMMENT_NUM,GOOD_REVIEW_NUM,MAIN_IMG_URL,SCORE_FEE,ACTIVITY_ID,ACTIVITY_START_TIME,SUPPLIER_SPU_ID,SUPPLIER_DELIVERY_TYPE, SUPPLIER_SPU_TYPE};
    String[] SHOP_FETCH_SOURCE = {SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,SHOP_NAME,SHOP_ADDR,AREA_CODE,MAIN_IMG_URL,PRICE_FEE,MARKET_PRICE_FEE,SPU_TYPE,SPU_MOLD,ACTUAL_SOLD_NUM,STOCK,SEQ,SPU_STATUS,SUPPLIER_SPU_TYPE,SUPPLIER_SPU_ID,SUPPLIER_DELIVERY_TYPE,SHOP_ID,SHOP_CATEGORY_ID,SHOP_SECONDARY_CATEGORY_ID,SHOP_CATEGORYID};
    String[] PLATFORM_FETCH_SOURCE = {SHOP_ID, SUPPLIER_ID, SUPPLIER_SPU_TYPE, SHOP_NAME,SHOP_ADDR,AREA_CODE, SUPPLIER_NAME,MAIN_IMG_URL,SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,PRICE_FEE,MARKET_PRICE_FEE,SPU_TYPE,SPU_MOLD,ACTUAL_SOLD_NUM,WATER_SOLD_NUM,STOCK,SEQ,IS_TOP,SPU_STATUS,SCORE_FEE,PRIMARY_CATEGORY_ID};
    String[] PLATFORM_TAG_FETCH_SOURCE = {SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,MAIN_IMG_URL,SPU_STATUS,TAGS};
    String[] SIMPLE_FETCH_SOURCE = {SPU_ID,SHOP_NAME,SPU_NAME_ZH,SPU_NAME_EN,MAIN_IMG_URL,UPDATE_TIME};
    String[] DISTRIBUTION_SPU_SOURCE = {SPU_ID,SHOP_NAME,SPU_NAME_ZH,SPU_NAME_EN,MAIN_IMG_URL,PRICE_FEE,DISTRIBUTION_INFO};
    String[] SUPPLIER_SPU = {SPU_ID,SHOP_ID,MAIN_IMG_URL,SPU_NAME_ZH,SPU_NAME_EN,BRAND_NAME_ZH,BRAND_NAME_EN,SHOP_NAME,PRICE_FEE,SPU_STATUS,CATEGORY_NAMES,SUPPLIER_SPU_TYPE,SUPPLIER_NAME,SUPPLIER_ID,BRAND,SHOP_NAME,SHOP_SECONDARY_CATEGORY_ID,SHOP_CATEGORYID};
    String[] CONSIGNMENT_SPU = {SPU_ID,MAIN_IMG_URL,SPU_NAME_ZH,SPU_NAME_EN,CATEGORY_NAME,BRAND_NAME_ZH,BRAND_NAME_EN,SUPPLIER_NAME,SPU_STATUS,SKU_CHOICE_STATUS,SUPPLIER_ID,BRAND_NAME,COMMISSION_SPU_STATUS,SUPPLIER_SPU_ID,CATEGORY_NAMES,BRAND,SUPPLIER_DELIVERY_TYPE,SHOP_CATEGORYID};
    String[] SUPPLIER_FETCH_SOURCE ={SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,MAIN_IMG_URL,PRICE_FEE,MARKET_PRICE_FEE,ACTUAL_SOLD_NUM,STOCK,SEQ,SPU_STATUS, CATEGORY_ID, CATEGORY_NAME, SUPPLIER_NAME, HAS_STOCK, BRAND_NAME, SPU_CODE, SKU_CODE,CATEGORY_NAMES,PARTY_CODE,BRAND};
    String[] RENOVATION_FETCH_SOURCE = {SPU_ID,SPU_NAME_ZH,SPU_NAME_EN,SPU_TYPE,SPU_STATUS,SELLING_POINT_ZH,SELLING_POINT_EN,SHOP_ID,SHOP_ADDR,AREA_CODE,PRICE_FEE,MARKET_PRICE_FEE,ACTIVITY_PRICE,SCORE_FEE,SALE_NUM,MAIN_IMG_URL,ACTIVITY_ID,SHOP_NAME,STOCK,ACTIVITY_START_TIME};
    String[] PLATFORM_EXPORT_FETCH_SOURCE = {SPU_ID, SPU_TYPE, SPU_STATUS, SPU_MOLD, SPU_CODE,SHOP_NAME, SUPPLIER_NAME};

    /**
     * 订单指定返回字段
     */
    String[] ORDER_TASK_FETCH_SOURCE ={"orderId"};
    /**
     * 退款订单指定返回字段
     */
    String[] REFUND_ORDER_CANAL_TASK_FETCH_SOURCE ={"refundId"};
    /**
     * 退款订单超时提醒指定返回字段
     */
    String[] REFUND_ORDER_TIMEOUT_REMINDER_TASK_FETCH_SOURCE ={"refundId", "orderId", "spuNameZh", "spuNameEn", "shopId", "userId", "actualTotal", "mobile"};

    /**
     * 待发货订单返回字段
     */
    String[] UN_DELIVERY_ORDER_FETCH_SOURCE ={"orderId", "consignee", "mobile", "deliveryType", "orderAddrId", "total", "actualTotal",  "shopId", "userId", "orderItems", "province", "city", "area", "addr"};}
